package 抽象类GeometricFigure及其子类;

/**
 * @author ：wang-ting
 * @Date：2025/6/21 23:16
 */
public class Circle  extends GeometricFigure{
    private double radius;
    public Circle(double radius) {
        this.radius = radius;
    }

    @Override
    public double getArea() {
        return Math.PI * radius * radius;
    }

    @Override
    public double getPerimeter() {
        return 2 * Math.PI * radius;
    }
}
